<?php declare(strict_types=1);
/**
 * This file is part of Swoft.
 *
 * @link     https://swoft.org
 * @document https://swoft.org/docs
 * @contact  group@swoft.org
 * @license  https://github.com/swoft-cloud/swoft/blob/master/LICENSE
 */

namespace App\Http\Controller\Test;

use App\Process\MonitorProcess;
use Swoft\Http\Server\Annotation\Mapping\Controller;
use Swoft\Http\Server\Annotation\Mapping\RequestMapping;
use Swoft\Http\Server\Annotation\Mapping\RequestMethod;
use function bean;
use function vdump;

/**
 * Class SwoftProcController
 *
 * @since 2.0
 *
 * @Controller(prefix="/proc")
 */
class SwoftProcController
{
    /**
     * @RequestMapping(route="test",method={RequestMethod::GET})
     *
     * @return string
     */
    public function test()
    {
        $mp = bean(MonitorProcess::class);
        vdump($mp->getSwooleProcess()->exportSocket());
        return 'hello';
    }
}
